package com.hudongwx.godoffood.activity.myActivity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import com.hudongwx.godoffood.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.activity_opinion)
public class OpinionActivity extends AppCompatActivity {
    @ViewInject(R.id.my_opinion_et)
    private EditText editText;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
    }
    @Event(R.id.my_opinion_btn)
    private  void submet(View view){
        if(TextUtils.isEmpty(editText.getText()+"")){
            Toast.makeText(this,"吐槽的信息不能为空",Toast.LENGTH_SHORT).show();
        }else {
            Toast.makeText(this,"提交成功",Toast.LENGTH_SHORT).show();
            editText.setText("");
        }
    }
    @Event(R.id.my_opinion_iv_back)
    private void back(View view){
        finish();
    }
}
